package com.wcity.manage.common.vo.community.workguide;

import org.apache.commons.lang.StringUtils;

import java.util.Date;

/**
 * 办事指南
 * Created by hgg on 2016/12/14.
 */
public class WorkGuideVo {

    private Integer id;

    /**
     * 指南类别ID
     */
    private Integer guideId;

    /**
     * 指南类别名称
     */
    private String guideName;

    /**
     * 指南标题
     */
    private String guideTitle;

    /**
     * 相关内容
     */
    private String guideContent;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 关联社区管理员用户ID
     */
    private Integer userId;

    /**
     * 关联小区ID
     */
    private Integer blockId;

    /**
     * 关联小区名称
     */
    private String blockName;

    /**
     * 相关内容(截取前15个汉字)
     */
    private String showGuideContent;

    private String imgUrl;

    public WorkGuideVo(Integer id, Integer guideId, String guideName, String guideTitle, String guideContent, Integer userId, Integer blockId, Date createTime, Date updateTime) {
        this.id = id;
        this.guideId = guideId;
        this.guideName = guideName;
        this.guideTitle = guideTitle;
        this.guideContent = guideContent;
        this.userId = userId;
        this.blockId = blockId;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public WorkGuideVo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getGuideId() {
        return guideId;
    }

    public void setGuideId(Integer guideId) {
        this.guideId = guideId;
    }

    public String getGuideName() {
        return guideName;
    }

    public void setGuideName(String guideName) {
        this.guideName = guideName;
    }

    public String getGuideTitle() {
        return guideTitle;
    }

    public void setGuideTitle(String guideTitle) {
        this.guideTitle = guideTitle;
    }

    public String getGuideContent() {
        return guideContent;
    }

    public void setGuideContent(String guideContent) {
        this.guideContent = guideContent;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getBlockId() {
        return blockId;
    }

    public void setBlockId(Integer blockId) {
        this.blockId = blockId;
    }

    public String getShowGuideContent() {
        if( StringUtils.isNotBlank( guideContent ) && guideContent.length() > 15 ){
            showGuideContent = guideContent.substring( 0,15 )+"...";
        }else {
            showGuideContent = guideContent;
        }
        return showGuideContent;
    }

    public void setShowGuideContent(String showGuideContent) {
        this.showGuideContent = showGuideContent;
    }

    public String getBlockName() {
        return blockName;
    }

    public void setBlockName(String blockName) {
        this.blockName = blockName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
}
